x86/AMD: Stop counters on VPMU save
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 15 Apr 2013 09:25:18 +0000 (11:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Apr 2013 09:25:18 +0000 (11:25 +0200)
commit5fb2decd2d3a821a7e9cff8c53220eaa45557d8f
treef406281d4d878edb9bb150a32ce01ddac577a4f0
parent176706746dee6ad72f6bf15d2b6093973c652d6b
x86/AMD: Stop counters on VPMU save

Stop the counters during VPMU save operation since they shouldn't be
running when VPCU that controls them is not. This also makes it
unnecessary to check for overflow in context_restore()

Set LVTPC vector before loading the context during vpmu_restore().
Otherwise it is possible to trigger an interrupt without proper vector.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
xen/arch/x86/hvm/svm/vpmu.c